//app.js
App({
  http : require('./utils/http.js'),
  onLaunch: function () {
      this.initData();
  },
  initData: function(){
    var that = this;
    this.http.getCarTypes(
      res => { this.globalData.carTypes = res.data.data;},
      null,
      null );
    this.http.getRepairPosition(
      res => { this.globalData.repairPositions = res.data.data;},
      null,
      null);
    this.http.getPartsTypes(
      res => { this.globalData.partsTypes = res.data.data;},
      null,
      null);
  },
  getRepairPosition: function(){
      
  },
  getPartsTypes: function () {

  },
  globalData: {
    userInfo: null,
    carType: [{ carName: "宝马", carID: 1 }, { carName: "奔驰", carID: 2 }, { carName: "雷克萨斯", carID: 3 }, { carName: "保时捷", carID: 4 }],
    repairPositions: [{ addressDetail: "珠海市", addressID: 1 }, { addressDetail: "广州市", addressID: 2 }, { addressDetail: "深圳市", addressID: 3 }],
    partsTypes: [{ typeDetail: "宝马", typeID: 1 }, { typeDetail: "奔驰", typeID: 2 }, { typeDetail: "雷克萨斯", typeID: 3 }, { typeDetail: "保时捷", typeID: 4 }],
  }
})